﻿@model ArivisTests.Models.UserTestsModel
@using ArivisTests.Views;

@{
    ViewBag.Title = "My Tests";
    var userName = WebMatrix.WebData.WebSecurity.CurrentUserName;
}

@section Navigation{
    Tests &rsaquo; @userName
}

<p></p>

@if (Model.CurrentRun == null)
{
    <div>
        No tests available.
    </div>
}
else
{
    <div style="margin: 1em 0;">
        @Html.TestProgressText(Model.UserTests)
    </div>
    if (Model.NextTest != null)
    {
    @Html.Partial("_NextTest", Model.NextTest)
    }

    <p></p>
    
    if (Model.UserTests != null && Model.UserTests.Count > 0)
    {
    <fieldset class="with-border">
        <legend>Test Run &rsaquo; @Html.ActionLink(Model.CurrentRun.Name, "Details", "TestRun", new { id = Model.CurrentRun.Id }, null)
        </legend>
        @Html.Partial("_TestsByResult", Model.UserTests)
    </fieldset>
    }
}



